package com.ltmonitor.entity;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * 功能权限 用于对角色分配权限
 * 
 * @author DELL
 * 
 */
@Entity
@Table(name = "functionModel")
@org.hibernate.annotations.Proxy(lazy = false)
public class FunctionModel extends TenantEntity implements Serializable {
	private static final long serialVersionUID = -6023569156743874873L;
	/**
	 * 非功能菜单，用于对功能进行分类，不用于权限判断
	 */
	public static final int FUNC_TYPE_NONE = 0;
	/**
	 * 主功能菜单
	 */
	public static final int FUNC_TYPE_MAIN_MENU = 1;
	/**
	 * 右键功能菜单
	 */
	public static final int FUNC_TYPE_RIGHT_MENU = 2;
	/**
	 * 地图工具栏
	 */
	public static final int FUNC_TYPE_MAP_TOOL = 3;
	/**
	 * 移动端权限
	 */
	public static final int FUNC_TYPE_MOBILE = 4;
	/**
	 * 命令工具
	 */
	public static final int FUNC_TYPE_COMMAND_TOOL = 5;
	/**
	 * 主菜单中的快捷菜单
	 */
	public static final int FUNC_TYPE_MAIN_SHORT_CURT = 6;
	
	public static final int FUNC_TYPE_WEB_FUNC = 7;


	private long entityId;
	private String funcName;
	private String url;
	/**
	 * 菜单权限的中文名称
	 */
	private String descr;
	
	/**
	 *子分组名称 
	 */
	private String childMenu = "";
	/**
	 * 菜单类型
	 */
	private int funcType;
	/**
	 * 上级菜单Id
	 */
	private long parentId;
	// private int style;
	/**
	 * 图标或图标的css名称
	 */
	private String icon;

	//菜单排序
	private int menuSort;
	

	public FunctionModel() {
	}

	public FunctionModel(int id) {
		this.entityId = id;
	}

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "funcId", unique = true, nullable = false)
	public long getEntityId() {
		return this.entityId;
	}

	public void setEntityId(long id) {
		this.entityId = id;
	}

	@Column(name = "url", length = 50)
	public String getUrl() {
		return this.url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	@Column(name = "descr")
	public String getDescr() {
		return this.descr;
	}

	public void setDescr(String descr) {
		this.descr = descr;
	}

	@Column(name = "funcType")
	public int getFuncType() {
		return this.funcType;
	}

	public void setFuncType(int funcType) {
		this.funcType = funcType;
	}

	@Column(name = "name")
	public String getFuncName() {
		return this.funcName;
	}

	public void setFuncName(String funcName) {
		this.funcName = funcName;
	}

	@Column(name = "parentId")
	public long getParentId() {
		return this.parentId;
	}

	public void setParentId(long parentId) {
		this.parentId = parentId;
	}

	@Column(name = "menuSort")
	public int getMenuSort() {
		return this.menuSort;
	}

	public void setMenuSort(int menuSort) {
		this.menuSort = menuSort;
	}

	public String getIcon() {
		return icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}
	
	public String getChildMenu() {
		return childMenu;
	}

	public void setChildMenu(String childMenu) {
		this.childMenu = childMenu;
	}

}
